<?php


namespace app\api\controller;
use \app\common\business\Category as CategoryBiz;
use think\Exception;

class Category extends ApiBase
{
    /**
     * 菜单导航
     * @return \think\response\Json
     */
    public function menus() {
        $data = (new CategoryBiz())->getMenusAndGoods();
        return show(config('status.success'), 'ok', $data);
    }

    /**
     * 分类及商品
     * @return \think\response\Json
     */
    public function list() {
        $data = (new CategoryBiz())->getFirstCategoryAndGoods();
        return show(config('status.success'), 'ok', $data);
    }

}